Skip to content

Docs: Update Time Series examples (Clean Re-submission)#2272

Open
jaytiwarihub wants to merge 2 commits intokeras-team:masterfrom
jaytiwarihub:fix-timeseries-clean
Open

Docs: Update Time Series examples (Clean Re-submission)#2272
jaytiwarihub wants to merge 2 commits intokeras-team:masterfrom
jaytiwarihub:fix-timeseries-clean

Conversation

@jaytiwarihub
Copy link

This PR updates the timeseries_weather_forecasting and timeseries_traffic_forecasting examples.

Changes:

Updated Last modified dates to the current date.

Regenerated .ipynb files to match the latest scripts.

Note: This is a clean re-submission of PR #2236 to resolve merge conflicts and history issues.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jaytiwarihub, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on updating and improving the existing time series forecasting examples. The primary goal is to enhance the robustness of data loading and file path handling, ensuring better cross-platform compatibility and reliability. Additionally, metadata such as 'Last modified' dates have been refreshed, and the Jupyter notebooks have been regenerated to align with the updated scripts. This re-submission addresses and resolves prior merge conflicts.

Highlights

  • Metadata Updates: The 'Last modified' dates in the headers of both timeseries_traffic_forecasting and timeseries_weather_forecasting examples (for both .ipynb and .py files) have been updated to '2026/02/01'.
  • Robust Data Loading Fixes: The data loading mechanisms in both time series examples have been improved to handle file extraction and path construction more robustly and in an OS-agnostic manner. This includes using os.path.dirname to correctly identify extracted directories and os.path.join for safe path concatenation.
  • Dependency Addition: The os module has been imported in the timeseries_weather_forecasting example to support the new path manipulation logic.
  • Notebook Regeneration: The .ipynb files for both examples have been regenerated to reflect the script changes and resolve previous merge conflicts and history issues, as this PR is a clean re-submission.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates two time series examples, timeseries_weather_forecasting and timeseries_traffic_forecasting. The changes include updating the 'last modified' dates and, more importantly, improving the data loading logic to be more robust by using os.path.dirname and os.path.join for path manipulation. This is a good improvement over the previous brittle string manipulation. However, when regenerating the notebooks, local file paths were accidentally included in the notebook metadata. These should be removed to avoid exposing user-specific information.

"colab": {
"collapsed_sections": [],
"name": "timeseries_traffic_forecasting",
"name": "C:\\Users\\om777\\keras-io\\examples\\timeseries\\timeseries_traffic_forecasting",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A hardcoded local file path has been committed to the notebook's metadata. This is likely unintentional and can expose private user information. It's best to revert this to a generic name for the notebook.

Suggested change
"name": "C:\\Users\\om777\\keras-io\\examples\\timeseries\\timeseries_traffic_forecasting",
"name": "timeseries_traffic_forecasting",

"colab": {
"collapsed_sections": [],
"name": "timeseries_weather_forecasting",
"name": "C:\\Users\\om777\\keras-io\\examples\\timeseries\\timeseries_weather_forecasting",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A hardcoded local file path has been committed to the notebook's metadata. This is likely unintentional and can expose private user information. It's best to revert this to a generic name for the notebook.

Suggested change
"name": "C:\\Users\\om777\\keras-io\\examples\\timeseries\\timeseries_weather_forecasting",
"name": "timeseries_weather_forecasting",

@sachinprasadhs
Copy link
Collaborator

Still your .ipynb files references your local path.

You have to generate .ipynb and .md files from .py files.
Considering .py file as source of truth, DO NOT MANUALLY EDIT the .md and .ipynb files.

You can generate the example using the command for each .py files like this.

cd scripts
python autogen.py add_example timeseries/timeseries_weather_forecasting.py‎

Similarly follow for other example as well.

@jaytiwarihub
Copy link
Author

@sachinprasadhs thanks , I'm on it plus other examples too

@github-actions
Copy link

github-actions bot commented Mar 1, 2026

This PR is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Mar 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants